package com.hbnu.array;

import java.util.Scanner;

public class AaaryDemoTest {
    public static void main(String[] args) {
        //1、创建键盘输入对象
        Scanner scanner = new Scanner(System.in);
        int[] nums = new int[5];
        for (int i = 0; i < nums.length; i++) {
            nums[i] = scanner.nextInt();
        }
        for(int i=0;i< nums.length;i++) {
            int temp;
            for (int j = 0; j < nums.length - 1; j++) {
                if (nums [j]>nums[j + 1]) {
                    temp = nums[j];
                    nums[j] = nums[j + 1];
                    nums[j + 1] = temp;
                }
            }
        }
        for (int i = 0; i < nums.length; i++) {
            System.out.print(nums[i] + " ");
        }
    }
}